package com.punai.common.core.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.punai.common.core.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

@TableName("sys_company")
public class SysCompany extends BaseEntity {

    /** 公司ID */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private Long companyId;
    /** 父id */
    private Long pid;
    /** 公司链 */
    private String pids;
    /** prefix 前缀 生成公司用户使用 */
    private String prx;
    private String companyName;
    private Integer companySort;
    /** 状态  0 正常 1 停用 */
    private String status;

    /** C(创建) O(创建公司时默认) */
    private String source;

    private String remark;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 子部门 */
    @TableField(exist = false)
    private List<SysCompany> children = new ArrayList<>();

    /**
     * 角色组
     */
    @TableField(exist = false)
    private Long roleId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public String getPids() {
        return pids;
    }

    public void setPids(String pids) {
        this.pids = pids;
    }

    public String getPrx() {
        return prx;
    }

    public void setPrx(String prx) {
        this.prx = prx;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public Integer getCompanySort() {
        return companySort;
    }

    public void setCompanySort(Integer companySort) {
        this.companySort = companySort;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<SysCompany> getChildren() {
        return children;
    }

    public void setChildren(List<SysCompany> children) {
        this.children = children;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }
}
